/**
 * Created by xwy on 2018/1/17 0017 20:58.
 * User: 13720092498@163.com
 */

import App from './App.vue';

import router from './router/index.js';
import store from '../src/store/index.js';
import api from './assets/http/index';
import Vuex from 'vuex';
import mixins from './mixins'


// register global mixins.
Vue.mixin(mixins)

const modal = weex.requireModule('modal')
if (WXEnvironment.platform == 'Web') {
    modal.toast({ message: 'web端' })
} else {
    modal.toast({ message: 'app' })
}

// Vue.prototype.$api = api
Vue.prototype.apiUrl = 'http://112.74.31.159:8233/smy-worker-web'
Vue.prototype.$api = api

new Vue(
    Vue.util.extend({
        el: '#root',
        router, store }, App)
)

router.push({path: '/login'})
